package outerclass.anonymous_demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025/5/11
 * Time: 19:26
 */
interface IUsb{
    void method();
}

public class OuterClass {
    public static void main(String[] args) {
        //匿名内部类
        IUsb iUsb = new IUsb()
        {
            @Override
            public void method() {
                System.out.println("匿名内部类");
            }
        };
        iUsb.method();
    }
}
